//统一管理咱们项目用户相关的接口
import request from '@/utils/request'
//项目用户相关的请求地址
enum API {
  baseList = '/querydispatchbasepage',
  taskList = '/querydispatchitempage',
  dispatchTask = '/pushtask',
  checkDetail = '/getIqcDetail',
  getDelivery = '/getDeliveryChose',
  upCheckResult = '/UpIqcResult',
}
// 获取送货列表
const getDeliveryList = (params: any): any =>
  request.get(API.getDelivery, { params })
// 获取iqc检验明细
const getCheckDetail = (params: any): any =>
  request.get(API.checkDetail, { params })
//上传检验结果
const upCheckResult = (data: any): any => request.post(API.upCheckResult, data)

// 详情
const baseDetail = (data: any): any => request.post(API.baseList, data)
// 备料任务列表
const getTaskList = (data: any): any => request.post(API.taskList, data)
// 下发备料任务
const dispatchTask = (data: any): any => request.post(API.dispatchTask, data)

export {
  getTaskList,
  dispatchTask,
  getCheckDetail,
  upCheckResult,
  baseDetail,
  getDeliveryList,
}
